// 角色

import requests from '@/utils/request'

// 导出获取角色列表请求
export const getRoleListAPI = (params) => {
  return requests({ url: '/sys/role', params })
}

// 导出新增角色请求
export const addRoleAPI = (data) => {
  return requests({ url: '/sys/role', method: 'post', data })
}

// 导出删除角色请求
export const delRoleAPI = (id) => {
  return requests({ url: `/sys/role/${id}`, method: 'delete' })
}

// 导出修改角色的请求
export const updateRoleAPI = (data) => {
  return requests({ url: `/sys/role/${data.id}`, method: 'put', data })
}

// 导出获取角色详情
export const getRoleDetailAPI = (id) => {
  return requests({ url: `/sys/role/${id}` })
}

// 导出分配权限角色
export const updateAssignPermAPI = (data) => {
  return requests({ url: '/sys/role/assignPrem', method: 'put', data })
}

